package exercise.day2;

import java.util.Scanner;

/**
 * @author Dianzhi Han
 * @version 1.0
 * @description: 将一句话的单词进行倒置，标点不倒置。比如 I like beijing. 经过函数后变为：beijing. like I
 * @date 2022/10/25 2:03
 */
public class Reversestring {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String[] list = s.split(" ");
        StringBuffer stringBuffer = new StringBuffer();
        for (int i = 0; i < list.length; i++) {
            stringBuffer.append(list[list.length - i-1]).append(" ");
        }
        System.out.println(stringBuffer.toString());
    }
}
